< previous page page_66 next page >

Page 66
Entity
Interface
Control
Entity Classes
Entity classes represent the types of objects whose data needs to be stored persistently beyond the lifetime of the application session. This persistent storage is usually realized in the form of a database or flat file. Because you aren't always sure which storage approach a project will incorporate, you want to logically refer to these storage media as information repositories or information persistence. Thus, as storage media changes over time, your project artifacts (models and documentation) better stand the test of time and are reusable for future projects.
An example of an entity class is in order here:
Class:
SavingsAccount
Properties:
Number
CurrentBalance
DepositAmount
WithdrawalAmount
InterestRate
Methods:
depositFunds
withdrawFunds
viewTransactionHistory

Given a Visual Basic entity class of this structure, you might, as part of your domain-specified requirements, need to persistently store the savings account number, current balance, deposit amount, withdrawal amount, and interest rate. As an alternative, you might feel that the current balance is a derived property value, meaning that an accumulative query of your persistent storage media would render the current balance. Derived properties are typically borderline issues that must be addressed on a case-by-case basis. Nevertheless, you should understand what constitutes an entity class.
Entity classes are usually the first class type discovered during the earliest stages of analysis. For instance, if you're developing a system for a defense contract firm, you

 
< previous page page_66 next page >

If you like this book, buy it!